#pragma once

#include "Project.hpp"




namespace Engine
{
	namespace Edit
	{
		class ProjectTemplate
		{
		public:

			typedef boost::function<Project::ptr(QString, QFileInfo)>   factory;


			/**
			 * Creates a ProjectTemplate with the given name, description and factory function.
			 */
			ProjectTemplate(QPixmap icon, QString name, QString description, factory fn);



			/**
			 * @returns the icon of this template
			 */
			QPixmap icon() const;

			/**
			 * @returns the name of this template
			 */
			QString name() const;

			/**
			 * @returns the description of this template
			 */
			QString description() const;

			/**
			 * Creates a project from this template.
			 */
			Project::ptr create(QString name, QFileInfo fileName) const;

		private:

			QPixmap   m_icon;
			QString   m_name;
			QString   m_description;
			factory   m_factory;
		};
		///////////////////////////////////////////////////////////////////////////////////////////
	}
	///////////////////////////////////////////////////////////////////////////////////////////////
}
///////////////////////////////////////////////////////////////////////////////////////////////////
